import random

n = int(input())
lsx = [random.random() for x in range(n)]
lsy = [random.random() for y in range(n)]
coordinate = zip(lsx, lsy)
count = 0
for xy in coordinate:
    if xy[0] ** 2 + xy[1] ** 2 <= 1:
        count = count + 1
PI = 4 * count / n
print('{:.6f}'.format(PI))
